package org.session.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * Session object serves as the unit of work for SessionService operations.
 */
public interface Session extends Serializable {
    AtomicBoolean getIsActive();

    String getSessionId();

    long getSizeBytes();

    Date getLastUpdateDate();

    Collection<SessionEntry> getEntries();

    void addEntry(SessionEntry entry);

    void deleteEntry(SessionEntry entry);

    void replaceEntry(SessionEntry entry);

    void setEntries(Vector<SessionEntry> entries);

    Date getCreationDate();

    // Mandatory
    RepositoryType getPrimaryRepositoryType();

    // Optional
    RepositoryType getSecondaryRepositoryType();

}
